<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
<!--    绘制登录注册表单-->
<!--    vue 双向绑定-->
    <!-- import Vue before Element -->
    <script src="https://cdn.staticfile.org/vue/2.6.14/vue.min.js"></script>
    <!-- import JavaScript -->
    <script src="https://cdn.staticfile.org/element-ui/2.15.9/index.min.js"></script>
</head>
<body>
<div id="app" class="111">
    <input type="text" name="username" v-model="user.username">
    <input type="password" name="password" v-model="user.password">
    <button type="button" @click="login()"></button>
</div>

</body>
<!--引入Axios-->
<script src="https://cdn.bootcss.com/axios/0.18.0/axios.min.js"></script>
</html>
<script>
    let v = new Vue({
        el:"#app",
        data:{
            user:{
                username:"",
                password:""
            }
        },
        methods:{
            login() {
                axios.post("/login",v.username).then(function (r) {
                    console.log(r)
                })
            }
        }

        }
    )
</script>